/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package origendatos.dyd.model;

import java.io.Serializable;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 *
 * @author erodrig
 */
@Entity
@Table(name = "ARMAS")
@NamedQueries({
    @NamedQuery(name = "Armas.findAll", query = "SELECT a FROM Armas a"),
    @NamedQuery(name = "Armas.findByBonificadorTAtaque", query = "SELECT a FROM Armas a WHERE a.bonificadorTAtaque = :bonificadorTAtaque"),
    @NamedQuery(name = "Armas.findByDano", query = "SELECT a FROM Armas a WHERE a.dano = :dano"),
    @NamedQuery(name = "Armas.findByCritico", query = "SELECT a FROM Armas a WHERE a.critico = :critico"),
    @NamedQuery(name = "Armas.findByAlcance", query = "SELECT a FROM Armas a WHERE a.alcance = :alcance"),
    @NamedQuery(name = "Armas.findByPeso", query = "SELECT a FROM Armas a WHERE a.peso = :peso"),
    @NamedQuery(name = "Armas.findByTipo", query = "SELECT a FROM Armas a WHERE a.tipo = :tipo"),
    @NamedQuery(name = "Armas.findByTama\u00f1o", query = "SELECT a FROM Armas a WHERE a.tama\u00f1o = :tama\u00f1o"),
    @NamedQuery(name = "Armas.findByEspeciales", query = "SELECT a FROM Armas a WHERE a.especiales = :especiales"),
    @NamedQuery(name = "Armas.findByNombre", query = "SELECT a FROM Armas a WHERE a.nombre = :nombre"),
    @NamedQuery(name = "Armas.findById", query = "SELECT a FROM Armas a WHERE a.id = :id")})
public class Armas implements Serializable {
    private static final long serialVersionUID = 1L;
    @Basic(optional = false)
    @Column(name = "BONIFICADOR_T_ATAQUE", nullable = false, length = 10)
    private String bonificadorTAtaque;
    @Column(name = "DANO", length = 6)
    private String dano;
    @Column(name = "CRITICO", length = 10)
    private String critico;
    @Column(name = "ALCANCE", length = 20)
    private String alcance;
    @Column(name = "PESO", length = 10)
    private String peso;
    @Column(name = "TIPO", length = 35)
    private String tipo;
    @Column(name = "TAMA\u00d1O", length = 15)
    private String tamaño;
    @Column(name = "ESPECIALES", length = 100)
    private String especiales;
    @Basic(optional = false)
    @Column(name = "NOMBRE", nullable = false, length = 20)
    private String nombre;
    @Id
    @Basic(optional = false)
    @Column(name = "ID", nullable = false)
    private Integer id;
    @Lob
    @Column(name = "IMAGEN")
    private Serializable imagen;
    @OneToMany(mappedBy = "armas")
    private List<Pj> pjList;
    @OneToMany(mappedBy = "armas1")
    private List<Pj> pjList1;
    @OneToMany(mappedBy = "armas2")
    private List<Pj> pjList2;

    public Armas() {
    }

    public Armas(Integer id) {
        this.id = id;
    }

    public Armas(Integer id, String bonificadorTAtaque, String nombre) {
        this.id = id;
        this.bonificadorTAtaque = bonificadorTAtaque;
        this.nombre = nombre;
    }

    public String getBonificadorTAtaque() {
        return bonificadorTAtaque;
    }

    public void setBonificadorTAtaque(String bonificadorTAtaque) {
        this.bonificadorTAtaque = bonificadorTAtaque;
    }

    public String getDano() {
        return dano;
    }

    public void setDano(String dano) {
        this.dano = dano;
    }

    public String getCritico() {
        return critico;
    }

    public void setCritico(String critico) {
        this.critico = critico;
    }

    public String getAlcance() {
        return alcance;
    }

    public void setAlcance(String alcance) {
        this.alcance = alcance;
    }

    public String getPeso() {
        return peso;
    }

    public void setPeso(String peso) {
        this.peso = peso;
    }

    public String getTipo() {
        return tipo;
    }

    public void setTipo(String tipo) {
        this.tipo = tipo;
    }

    public String getTamaño() {
        return tamaño;
    }

    public void setTamaño(String tamaño) {
        this.tamaño = tamaño;
    }

    public String getEspeciales() {
        return especiales;
    }

    public void setEspeciales(String especiales) {
        this.especiales = especiales;
    }

    public String getNombre() {
        return nombre;
    }

    public void setNombre(String nombre) {
        this.nombre = nombre;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Serializable getImagen() {
        return imagen;
    }

    public void setImagen(Serializable imagen) {
        this.imagen = imagen;
    }

    public List<Pj> getPjList() {
        return pjList;
    }

    public void setPjList(List<Pj> pjList) {
        this.pjList = pjList;
    }

    public List<Pj> getPjList1() {
        return pjList1;
    }

    public void setPjList1(List<Pj> pjList1) {
        this.pjList1 = pjList1;
    }

    public List<Pj> getPjList2() {
        return pjList2;
    }

    public void setPjList2(List<Pj> pjList2) {
        this.pjList2 = pjList2;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Armas)) {
            return false;
        }
        Armas other = (Armas) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "origendatos.dyd.model.Armas[id=" + id + "]";
    }

}
